@extends('admin.app')

@section('breadcrumb')
    <div class="bg-light lter b-b wrapper-md">
        <ol class="breadcrumb bg-light lter m-n no-padder">
            <li><a href="{{ admin_action('HomeController@index') }}">主页</a></li>
            <li>业务管理</li>
            <li><a href="{{ admin_action('Business\OrganizationalUserManagementController@index') }}">机构用户管理</a></li>
            <li class="active">新增机构部门</li>
        </ol>
    </div>
@endsection

@section('content')
    <div class="panel panel-default">
        <div class="panel-heading font-bold">
        设置经纪人收益比例
        </div>
        <div class="panel-body">
            <form enctype="multipart/form-data" class="form-horizontal form-validation"
                  action="{{ admin_action('Business\OrganizationalUserManagementController@saveBrokerDncomeDistribution',[$org_id]) }}"
                  method="post">
                {{ csrf_field() }}
                <label class="text-danger">*值必填,-1代表不启用,其他值都为启用,机构分成比例不能超过分润模板默认值</label><br>
                <label class="text-danger">经纪人分润比例之和,不能超过对应项目的分润规则 第一阶段的纪经人分润比例</label>
                <div class="line line-dashed b-b line-lg"></div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">一级经纪人分润比例*</label>
                    <div class="col-lg-4">
                        <input type="number" class="form-control" name="profit_ratio" value="{{ $org->profit_ratio??'-1' }}"
                               placeholder="填写分润比例" data-rule-required="true">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">二级经济人分润比例*</label>
                    <div class="col-lg-4">
                        <input type="number" class="form-control" name="second_radio" value="{{ $org->second_radio??'-1' }}"
                               placeholder="填写分润比例" data-rule-required="true">
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg"></div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">机构自身分润比例*</label>
                    <div class="col-lg-4">
                        <input type="number" class="form-control" name="org_profit" value="{{ $org->org_profit??'-1' }}"
                               placeholder="填写分润比例" data-rule-required="true">
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg"></div>
                <div class="form-group">
                    <div class="col-lg-4 col-lg-offset-2">
                        <a href="{{ admin_action('Business\OrganizationalUserManagementController@index') }}"
                           class="btn btn-default">返&nbsp;回</a>
                        <button type="submit" class="btn btn-primary">设置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
@endsection 